package acm.第二轮;

import java.util.PriorityQueue;
import java.util.Scanner;

public class D {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int count=sc.nextInt();
        while (count-- > 0) {
            int n=sc.nextInt();
            PriorityQueue<Integer> topQueue=new PriorityQueue<>((a,b)->a-b);  //小根堆
            PriorityQueue<Integer> botQueue=new PriorityQueue<>((a,b)->b-a);    //大根堆
            for (int i = 1; i <= n; i++) {
                int num=sc.nextInt();
                if (i<=n/2){
                    topQueue.add(num);
                }else {
                    if (num>topQueue.peek()) {
                        botQueue.add(topQueue.poll());
                        topQueue.add(num);
                    }else{
                        botQueue.add(num);
                    }
                }
            }
            int k=topQueue.poll()+botQueue.poll();
            while (!topQueue.isEmpty()&&!botQueue.isEmpty()){
                if (k!=topQueue.peek()+botQueue.peek()){
                    break;
                }
                topQueue.poll();
                botQueue.poll();
            }
            if (topQueue.size()+botQueue.size()>1){
                System.out.println("NO");
            }else{
                System.out.println("YES");
            }
        }
    }
}
